package com.ryzx.common.response;

public class BapException extends Exception{
    private String message;
    private BapResult responseBody;

    public BapException(String message) {
        super(message);
    }
    public BapException(BapResultCode infoEnum, String message) {
        this.responseBody = BapResult.fail(infoEnum, message);
    }
    public BapException(BapResultCode infoEnum) {
        super(infoEnum.getMessage());
        this.responseBody = BapResult.fail(infoEnum);
    }
    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public BapResult getResponseBody() {
        return responseBody;
    }

    public void setResponseBody(BapResult responseBody) {
        this.responseBody = responseBody;
    }
}
